Alert System Basics
The Alert System (Toast Notifications) provides animated notifications with icons and text that appear at the top of the screen. It's perfect for displaying important information, spell procs, or status updates to the player.
Basic Usage
The simplest way to show an alert is:
-- Show a simple text alert
Aurora.alert("Your message here")
-- Show an alert with a spell icon
Aurora.alert("Spell Ready!", 12345) -- Replace 12345 with your spell ID
Advanced Usage
You can customize the alert appearance and behavior:
-- Customized alert with timing and payload
Aurora.alert({
string = "Critical Hit!",
time = 3, -- Display for 3 seconds
fadeTime = 0.7, -- Fade out over 0.7 seconds
fadeInTime = 0.2 -- Fade in over 0.2 seconds
}, "Interface\\Icons\\ability_warrior_rampage", {
soundID = 12345, -- Play a sound
iconSizeOverride = 40, -- Custom icon size
circularMaskOverride = true -- Force circular icon mask
})
Features
- Animated Transitions: Smooth fade in/out and scaling animations
- Multiple Alerts: Stack multiple alerts with automatic management
- Icon Support: Display spell icons or custom textures
- Sound Effects: Play sounds with notifications
- Customizable: Extensive configuration options
- Auto-cleanup: Automatic removal of expired alerts
Best Practices
- Keep Messages Short: Alerts are best for brief, important messages
- Use Icons Wisely: Icons help users quickly identify the alert type
- Don't Spam: Avoid showing too many alerts in quick succession
- Sound Usage: Use sounds sparingly and only for important alerts
Examples
Here are some examples of how you can use the Alert System:
-- Proc alert with spell icon
Aurora.alert("Bloodlust Active!", 2825)
-- Custom duration alert
Aurora.alert({
string = "Boss Incoming!",
time = 5, -- Show for 5 seconds
}, "Interface\\Icons\\ability_warrior_charge")
-- Alert with sound
Aurora.alert("Level Up!", "Interface\\Icons\\achievement_level_80", {
soundID = 888 -- Level up sound
})